$(function() {
		
	setInterval (newOrders, 10000);
	
	function newOrders(){
		$.ajax({
			type: "POST",		
			url: "../orders/newOrders",
			success : function(data){
				var num = Number(data);
				if(!isNaN(num)&&num!=0){
					$("#newOrders").text(data);
					$("#newOrders").addClass("new");
					$("#newOrders").removeClass("glyphicon"); 
					$("#newOrders").removeClass("glyphicon-apple");
				}
			}
		});
	}
					
});



